home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1286.dms / var1286.adf / printers / IBMColorJet / Wait.asm < prev    next >
Assembly Source File  |  1992-09-02  |  3KB  |  90 lines

  1. * wait.asm *
  2. **********************************************************************
  3. *                                                                    *
  4. *   Copyright 1985, Commodore-Amiga Inc.   All rights reserved.      *
  5. *   No part of this program may be reproduced, transmitted,          *
  6. *   transcribed, stored in retrieval system, or translated into      *
  7. *   any language or computer language, in any form or by any         *
  8. *   means, electronic, mechanical, magnetic, optical, chemical,      *
  9. *   manual or otherwise, without the prior written permission of     *
  10. *   Commodore-Amiga Incorporated, 983 University Ave. Building #D,   *
  11. *   Los Gatos, California, 95030                                     *
  12. *                                                                    *
  13. **********************************************************************
  14. *
  15. *    wait
  16. *
  17. **********************************************************************
  18.  
  19.      SECTION        printer
  20.  
  21. *------ Included Files -----------------------------------------------
  22.  
  23.      INCLUDE        "exec/types.i"
  24.      INCLUDE        "exec/ports.i"
  25.      INCLUDE        "exec/devices.i"
  26.      INCLUDE        "exec/io.i"
  27.  
  28.      INCLUDE        "devices/timer.i"
  29.      INCLUDE        "devices/prtbase.i"
  30.  
  31.      INCLUDE        "macros.i"
  32.  
  33.  
  34. *------ Imported Names -----------------------------------------------
  35.  
  36. *------ Imported Functions -------------------------------------------
  37.  
  38.      XREF_EXE  Forbid
  39.      XREF_EXE  Permit
  40.      XREF_EXE  WaitIO
  41.      XREF      _SysBase
  42.  
  43.      XREF      _PD
  44.  
  45.  
  46. *------ Exported Functions -------------------------------------------
  47.  
  48.      XDEF      _PWait
  49.  
  50.  
  51. *------ printer.device/PWait -----------------------------------------
  52. *
  53. *   NAME
  54. *    PWait - wait for a time
  55. *
  56. *   SYNOPSIS
  57. *    PWait(seconds, microseconds);
  58. *
  59. *   FUNCTION
  60. *    PWait uses the timer device to wait after writes are complete
  61. *
  62. *---------------------------------------------------------------------
  63. _PWait:
  64.           MOVEM.L   A4/A6,-(A7)
  65.           MOVE.L    _PD,A4
  66.           MOVE.L    pd_PBothReady(A4),A0
  67.           JSR  (A0)
  68.           TST.L     D0
  69.           BNE.S     error
  70.  
  71.           LEA  pd_TIOR(A4),A1
  72.           MOVE.W    #TR_ADDREQUEST,IO_COMMAND(A1)
  73.           MOVE.L    12(A7),IOTV_TIME+TV_SECS(A1)
  74.           MOVE.L    16(A7),IOTV_TIME+TV_MICRO(A1)
  75.           CLR.B     IO_FLAGS(A1)
  76.           MOVE.L    IO_DEVICE(A1),A6
  77.           JSR  DEV_BEGINIO(A6)
  78.           LINKEXE   Forbid
  79.           LEA  pd_TIOR(A4),A1
  80.           LINKEXE   WaitIO
  81.           LINKEXE   Permit
  82.           MOVEQ     #0,D0
  83.           TST.L     D0
  84. error:
  85.           MOVEM.L   (A7)+,A4/A6
  86.           RTS
  87.  
  88.           END
  89.  
  90.